package cs.xwi7xwa.templates;

import android.content.Context;
import android.view.Gravity;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import cs.xwi7xwa.R;

public class Xwi7xwaToast extends Toast
{
    public Xwi7xwaToast(View layout, Context context, String text)
    {
        super(context);
        
        TextView textView = (TextView) layout.findViewById(R.id.toastText);
        textView.setText(text);
        //this.setGravity(Gravity.BOTTOM, 0, 0);
        setMargin(0, 0.1F);
        setDuration(Toast.LENGTH_SHORT);
        setView(layout);
        setGravity(Gravity.CENTER, this.getXOffset() / 2, this.getYOffset() / 2);
    }
}